home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 386 / utility / config.dup < prev    next >
Text File  |  1985-11-19  |  3KB  |  79 lines

  1.  ; Program Name: CONFIG.S
  2.  
  3.  ; Assembly Instructions:
  4.  
  5.  ;     Assemble in PC-relative mode and save with a PRG extension.  Move
  6.  ; CONFIG.PRG to the AUTO folder of the boot disk.
  7.  
  8.  ; Program Purpose:
  9.  
  10.  ;     Configures system variables.
  11.  
  12. mainline:
  13.  lea        stack, a7           ; Point A7 to this program's stack.
  14.  
  15. enter_supervisor_mode:
  16.  move.l     #0, -(sp)           ; The zero turns on supervisor mode.
  17.  move.w     #$20, -(sp)         ; Function = super = GEMDOS $20.
  18.  trap       #1                  ; Supervisor stack pointer returned in D0.
  19.  addq.l     #6, sp
  20.  
  21.  ; Algorithm 1:
  22.  
  23.  ; Turns off keyclick sound.  Refer to page 254 of the Internals book.  The
  24.  ; system variable at address $484 is a byte length variable.  The bits of
  25.  ; this variable have the meanings as indicated in the Internals book.  The
  26.  ; bit of interest is #0.  When this bit is a one, the computer emits a
  27.  ; click each time a key is pressed.  When the bit is a zero, these clicks
  28.  ; are not emitted.  A zero is placed in this bit by replacing the content
  29.  ; of the byte at $484 (which is 7 before the replacement, if key click is
  30.  ; enabled) with $6.
  31.  
  32. disable_key_click:
  33.  lea        $484, a0
  34.  move.b     #6, (a0)            ; Refer to page 254 of the Internals book.
  35.  
  36.  ; Algorithm 2:
  37.  
  38.  ;     Performs the printer installation that is accomplished by CONTROL.ACC.
  39.  ; The printer configuration table consists of one word, stored at $E4A.
  40.  ; The bits of this word have the following meanings:
  41.  
  42.  ;            BIT  MEANING IF ZERO  MEANING IF ONE
  43.  ;            ---  ---------------  --------------
  44.  ;             0   Dot matrix       Daisy printer
  45.  ;             1   Black/white      Color printer
  46.  ;             2   1280 dots/line   960 dots/line
  47.  ;             3   Draft mode       Final mode
  48.  ;             4   Printer port     Modem port
  49.  ;             5   Continuous feed  Single sheet
  50.  
  51.  ; Bits 6 through 15 are not used.
  52.  
  53. install_printer:
  54.  lea        $E4A, a0
  55.  move.w     #$4, (a0)
  56.  
  57.  ; Algorithm 3:
  58.  
  59.  ; Turns off disk write verify.
  60.  
  61. disable_write_verify:
  62.  lea        $444, a0
  63.  move.w     #0, (a0)            ; Refer to page 252 of the Internals book.
  64.  
  65. return_to_user_mode:
  66.  move.l     d0, -(sp)           ; Restore "before call" SSP.
  67.  move.w     #$20, -(sp)         ; Function = super = GEMDOS $20.
  68.  trap       #1                 
  69.  addq.l     #6, sp
  70.  
  71. terminate:
  72.  move.w     #0, -(sp)           ; Function = p_term_old = GEMDOS $0.
  73.  trap       #1                  ; GEMDOS call.
  74.  
  75.              ds.l    24         ; Stack.
  76. stack:       ds.l     1         ; Address of stack.
  77. program_end: ds.l     0
  78.  end
  79.